/*
*/

#ifndef Tracker_hpp
#define Tracker_hpp

#include <string>
#include <opencv2/objdetect.hpp>

#include <stdio.h>


class Tracker
{

public:
    // Constructor
    Tracker() { ; }

    void setLastFrame(cv::Mat frame);
    void setNearestBox(std::vector<cv::Rect> boxes);
    void detectCorners(cv::Mat &frameGray);
    bool trackFace(cv::Mat &frameGray);

    void updateMask(cv::Mat &frameGray);
    void updateROI();

protected:
    int min_corners = 5;
    int max_corners = 10;
    int min_distance = 25;
    float quality_level = 0.01;
    // Tracking
    cv::Mat lastFrameGray;
    std::vector<cv::Point2f> corners;

    // Mask
    cv::Rect box;
    cv::Mat_<uchar> mask;
    cv::Rect roi;
    
};

#endif /* Tracker_hpp */
